<?php ob_start();
include('mysql.php');
// $opid=$_POST['opid'];
// $follow=$_POST['follow'];
$url=$_POST['url'];         //一样的部分
$name=$_POST['name'];       //可有可无，一般是产品的名称
$snum=$_POST['snum'];       //图片序号开始值
$num=$_POST['num'];         //图片序号截止值
$format=$_POST['format'];   //图片格式
$text=$_POST['text'];       //标题
$class=$_POST['class'];     //分类
$exh=$_POST['exh'];         //是否展示
$belong=$_POST['belong'];   //属于

$a=$snum;
for(;$a<=$num;$a++){
    $row=mysql_query("SELECT * FROM exhibition where id = (SELECT max(id) FROM exhibition) ");
$back=mysql_fetch_assoc($row);
$maxx=$back['id']+1;
$urll=$url.$name.$a.$format;
    $sql=mysql_query( "INSERT INTO exhibition (id,url,text,class,exh,belong) VALUES ('$maxx','$urll','$text','$class','$exh','$belong')");
    echo($maxx.'/');
}
// $sql=mysql_query( "INSERT INTO exhibition (id,url,text,class,exh,belong) VALUES ('$maxx','$url','$text','$class','$exh','$belong')");
?>